/* ========================================================================
 * Copyright (c) 2005-2025 The OPC Foundation, Inc. All rights reserved.
 *
 * OPC Foundation MIT License 1.00
 * 
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 * 
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * The complete license agreement can be found here:
 * http://opcfoundation.org/License/MIT/1.00/
 * ======================================================================*/

using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace Opc.Ua
{
    #region ISessionServer Interface
    /// <summary>
    /// An interface to a UA server implementation.
    /// </summary>
    /// <exclude />
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Opc.Ua.ModelCompiler", "1.0.0.0")]
    public interface ISessionServer : IServerBase
    {
        #if (!OPCUA_EXCLUDE_FindServers)
        /// <summary>
        /// Invokes the FindServers service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_FindServers_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use FindServersAsync instead.")]
        #endif
        ResponseHeader FindServers(
            SecureChannelContext                 secureChannelContext,
            RequestHeader                        requestHeader,
            string                               endpointUrl,
            StringCollection                     localeIds,
            StringCollection                     serverUris,
            out ApplicationDescriptionCollection servers);

        #if (!OPCUA_EXCLUDE_FindServers_ASYNC)
        /// <summary>
        /// Invokes the FindServers service using async Task based request.
        /// </summary>
        Task<FindServersResponse> FindServersAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            string               endpointUrl,
            StringCollection     localeIds,
            StringCollection     serverUris,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_FindServersOnNetwork)
        /// <summary>
        /// Invokes the FindServersOnNetwork service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_FindServersOnNetwork_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use FindServersOnNetworkAsync instead.")]
        #endif
        ResponseHeader FindServersOnNetwork(
            SecureChannelContext          secureChannelContext,
            RequestHeader                 requestHeader,
            uint                          startingRecordId,
            uint                          maxRecordsToReturn,
            StringCollection              serverCapabilityFilter,
            out DateTime                  lastCounterResetTime,
            out ServerOnNetworkCollection servers);

        #if (!OPCUA_EXCLUDE_FindServersOnNetwork_ASYNC)
        /// <summary>
        /// Invokes the FindServersOnNetwork service using async Task based request.
        /// </summary>
        Task<FindServersOnNetworkResponse> FindServersOnNetworkAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 startingRecordId,
            uint                 maxRecordsToReturn,
            StringCollection     serverCapabilityFilter,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_GetEndpoints)
        /// <summary>
        /// Invokes the GetEndpoints service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_GetEndpoints_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use GetEndpointsAsync instead.")]
        #endif
        ResponseHeader GetEndpoints(
            SecureChannelContext              secureChannelContext,
            RequestHeader                     requestHeader,
            string                            endpointUrl,
            StringCollection                  localeIds,
            StringCollection                  profileUris,
            out EndpointDescriptionCollection endpoints);

        #if (!OPCUA_EXCLUDE_GetEndpoints_ASYNC)
        /// <summary>
        /// Invokes the GetEndpoints service using async Task based request.
        /// </summary>
        Task<GetEndpointsResponse> GetEndpointsAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            string               endpointUrl,
            StringCollection     localeIds,
            StringCollection     profileUris,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_CreateSession)
        /// <summary>
        /// Invokes the CreateSession service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_CreateSession_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use CreateSessionAsync instead.")]
        #endif
        ResponseHeader CreateSession(
            SecureChannelContext                    secureChannelContext,
            RequestHeader                           requestHeader,
            ApplicationDescription                  clientDescription,
            string                                  serverUri,
            string                                  endpointUrl,
            string                                  sessionName,
            byte[]                                  clientNonce,
            byte[]                                  clientCertificate,
            double                                  requestedSessionTimeout,
            uint                                    maxResponseMessageSize,
            out NodeId                              sessionId,
            out NodeId                              authenticationToken,
            out double                              revisedSessionTimeout,
            out byte[]                              serverNonce,
            out byte[]                              serverCertificate,
            out EndpointDescriptionCollection       serverEndpoints,
            out SignedSoftwareCertificateCollection serverSoftwareCertificates,
            out SignatureData                       serverSignature,
            out uint                                maxRequestMessageSize);

        #if (!OPCUA_EXCLUDE_CreateSession_ASYNC)
        /// <summary>
        /// Invokes the CreateSession service using async Task based request.
        /// </summary>
        Task<CreateSessionResponse> CreateSessionAsync(
            SecureChannelContext   secureChannelContext,
            RequestHeader          requestHeader,
            ApplicationDescription clientDescription,
            string                 serverUri,
            string                 endpointUrl,
            string                 sessionName,
            byte[]                 clientNonce,
            byte[]                 clientCertificate,
            double                 requestedSessionTimeout,
            uint                   maxResponseMessageSize,
            CancellationToken      ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_ActivateSession)
        /// <summary>
        /// Invokes the ActivateSession service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_ActivateSession_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use ActivateSessionAsync instead.")]
        #endif
        ResponseHeader ActivateSession(
            SecureChannelContext                secureChannelContext,
            RequestHeader                       requestHeader,
            SignatureData                       clientSignature,
            SignedSoftwareCertificateCollection clientSoftwareCertificates,
            StringCollection                    localeIds,
            ExtensionObject                     userIdentityToken,
            SignatureData                       userTokenSignature,
            out byte[]                          serverNonce,
            out StatusCodeCollection            results,
            out DiagnosticInfoCollection        diagnosticInfos);

        #if (!OPCUA_EXCLUDE_ActivateSession_ASYNC)
        /// <summary>
        /// Invokes the ActivateSession service using async Task based request.
        /// </summary>
        Task<ActivateSessionResponse> ActivateSessionAsync(
            SecureChannelContext                secureChannelContext,
            RequestHeader                       requestHeader,
            SignatureData                       clientSignature,
            SignedSoftwareCertificateCollection clientSoftwareCertificates,
            StringCollection                    localeIds,
            ExtensionObject                     userIdentityToken,
            SignatureData                       userTokenSignature,
            CancellationToken                   ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_CloseSession)
        /// <summary>
        /// Invokes the CloseSession service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_CloseSession_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use CloseSessionAsync instead.")]
        #endif
        ResponseHeader CloseSession(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            bool                 deleteSubscriptions);

        #if (!OPCUA_EXCLUDE_CloseSession_ASYNC)
        /// <summary>
        /// Invokes the CloseSession service using async Task based request.
        /// </summary>
        Task<CloseSessionResponse> CloseSessionAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            bool                 deleteSubscriptions,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Cancel)
        /// <summary>
        /// Invokes the Cancel service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Cancel_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use CancelAsync instead.")]
        #endif
        ResponseHeader Cancel(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 requestHandle,
            out uint             cancelCount);

        #if (!OPCUA_EXCLUDE_Cancel_ASYNC)
        /// <summary>
        /// Invokes the Cancel service using async Task based request.
        /// </summary>
        Task<CancelResponse> CancelAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 requestHandle,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_AddNodes)
        /// <summary>
        /// Invokes the AddNodes service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_AddNodes_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use AddNodesAsync instead.")]
        #endif
        ResponseHeader AddNodes(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            AddNodesItemCollection       nodesToAdd,
            out AddNodesResultCollection results,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_AddNodes_ASYNC)
        /// <summary>
        /// Invokes the AddNodes service using async Task based request.
        /// </summary>
        Task<AddNodesResponse> AddNodesAsync(
            SecureChannelContext   secureChannelContext,
            RequestHeader          requestHeader,
            AddNodesItemCollection nodesToAdd,
            CancellationToken      ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_AddReferences)
        /// <summary>
        /// Invokes the AddReferences service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_AddReferences_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use AddReferencesAsync instead.")]
        #endif
        ResponseHeader AddReferences(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            AddReferencesItemCollection  referencesToAdd,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_AddReferences_ASYNC)
        /// <summary>
        /// Invokes the AddReferences service using async Task based request.
        /// </summary>
        Task<AddReferencesResponse> AddReferencesAsync(
            SecureChannelContext        secureChannelContext,
            RequestHeader               requestHeader,
            AddReferencesItemCollection referencesToAdd,
            CancellationToken           ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_DeleteNodes)
        /// <summary>
        /// Invokes the DeleteNodes service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_DeleteNodes_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use DeleteNodesAsync instead.")]
        #endif
        ResponseHeader DeleteNodes(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            DeleteNodesItemCollection    nodesToDelete,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_DeleteNodes_ASYNC)
        /// <summary>
        /// Invokes the DeleteNodes service using async Task based request.
        /// </summary>
        Task<DeleteNodesResponse> DeleteNodesAsync(
            SecureChannelContext      secureChannelContext,
            RequestHeader             requestHeader,
            DeleteNodesItemCollection nodesToDelete,
            CancellationToken         ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_DeleteReferences)
        /// <summary>
        /// Invokes the DeleteReferences service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_DeleteReferences_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use DeleteReferencesAsync instead.")]
        #endif
        ResponseHeader DeleteReferences(
            SecureChannelContext           secureChannelContext,
            RequestHeader                  requestHeader,
            DeleteReferencesItemCollection referencesToDelete,
            out StatusCodeCollection       results,
            out DiagnosticInfoCollection   diagnosticInfos);

        #if (!OPCUA_EXCLUDE_DeleteReferences_ASYNC)
        /// <summary>
        /// Invokes the DeleteReferences service using async Task based request.
        /// </summary>
        Task<DeleteReferencesResponse> DeleteReferencesAsync(
            SecureChannelContext           secureChannelContext,
            RequestHeader                  requestHeader,
            DeleteReferencesItemCollection referencesToDelete,
            CancellationToken              ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Browse)
        /// <summary>
        /// Invokes the Browse service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Browse_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use BrowseAsync instead.")]
        #endif
        ResponseHeader Browse(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            ViewDescription              view,
            uint                         requestedMaxReferencesPerNode,
            BrowseDescriptionCollection  nodesToBrowse,
            out BrowseResultCollection   results,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_Browse_ASYNC)
        /// <summary>
        /// Invokes the Browse service using async Task based request.
        /// </summary>
        Task<BrowseResponse> BrowseAsync(
            SecureChannelContext        secureChannelContext,
            RequestHeader               requestHeader,
            ViewDescription             view,
            uint                        requestedMaxReferencesPerNode,
            BrowseDescriptionCollection nodesToBrowse,
            CancellationToken           ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_BrowseNext)
        /// <summary>
        /// Invokes the BrowseNext service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_BrowseNext_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use BrowseNextAsync instead.")]
        #endif
        ResponseHeader BrowseNext(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            bool                         releaseContinuationPoints,
            ByteStringCollection         continuationPoints,
            out BrowseResultCollection   results,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_BrowseNext_ASYNC)
        /// <summary>
        /// Invokes the BrowseNext service using async Task based request.
        /// </summary>
        Task<BrowseNextResponse> BrowseNextAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            bool                 releaseContinuationPoints,
            ByteStringCollection continuationPoints,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_TranslateBrowsePathsToNodeIds)
        /// <summary>
        /// Invokes the TranslateBrowsePathsToNodeIds service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_TranslateBrowsePathsToNodeIds_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use TranslateBrowsePathsToNodeIdsAsync instead.")]
        #endif
        ResponseHeader TranslateBrowsePathsToNodeIds(
            SecureChannelContext           secureChannelContext,
            RequestHeader                  requestHeader,
            BrowsePathCollection           browsePaths,
            out BrowsePathResultCollection results,
            out DiagnosticInfoCollection   diagnosticInfos);

        #if (!OPCUA_EXCLUDE_TranslateBrowsePathsToNodeIds_ASYNC)
        /// <summary>
        /// Invokes the TranslateBrowsePathsToNodeIds service using async Task based request.
        /// </summary>
        Task<TranslateBrowsePathsToNodeIdsResponse> TranslateBrowsePathsToNodeIdsAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            BrowsePathCollection browsePaths,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_RegisterNodes)
        /// <summary>
        /// Invokes the RegisterNodes service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_RegisterNodes_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use RegisterNodesAsync instead.")]
        #endif
        ResponseHeader RegisterNodes(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            NodeIdCollection     nodesToRegister,
            out NodeIdCollection registeredNodeIds);

        #if (!OPCUA_EXCLUDE_RegisterNodes_ASYNC)
        /// <summary>
        /// Invokes the RegisterNodes service using async Task based request.
        /// </summary>
        Task<RegisterNodesResponse> RegisterNodesAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            NodeIdCollection     nodesToRegister,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_UnregisterNodes)
        /// <summary>
        /// Invokes the UnregisterNodes service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_UnregisterNodes_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use UnregisterNodesAsync instead.")]
        #endif
        ResponseHeader UnregisterNodes(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            NodeIdCollection     nodesToUnregister);

        #if (!OPCUA_EXCLUDE_UnregisterNodes_ASYNC)
        /// <summary>
        /// Invokes the UnregisterNodes service using async Task based request.
        /// </summary>
        Task<UnregisterNodesResponse> UnregisterNodesAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            NodeIdCollection     nodesToUnregister,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_QueryFirst)
        /// <summary>
        /// Invokes the QueryFirst service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_QueryFirst_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use QueryFirstAsync instead.")]
        #endif
        ResponseHeader QueryFirst(
            SecureChannelContext          secureChannelContext,
            RequestHeader                 requestHeader,
            ViewDescription               view,
            NodeTypeDescriptionCollection nodeTypes,
            ContentFilter                 filter,
            uint                          maxDataSetsToReturn,
            uint                          maxReferencesToReturn,
            out QueryDataSetCollection    queryDataSets,
            out byte[]                    continuationPoint,
            out ParsingResultCollection   parsingResults,
            out DiagnosticInfoCollection  diagnosticInfos,
            out ContentFilterResult       filterResult);

        #if (!OPCUA_EXCLUDE_QueryFirst_ASYNC)
        /// <summary>
        /// Invokes the QueryFirst service using async Task based request.
        /// </summary>
        Task<QueryFirstResponse> QueryFirstAsync(
            SecureChannelContext          secureChannelContext,
            RequestHeader                 requestHeader,
            ViewDescription               view,
            NodeTypeDescriptionCollection nodeTypes,
            ContentFilter                 filter,
            uint                          maxDataSetsToReturn,
            uint                          maxReferencesToReturn,
            CancellationToken             ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_QueryNext)
        /// <summary>
        /// Invokes the QueryNext service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_QueryNext_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use QueryNextAsync instead.")]
        #endif
        ResponseHeader QueryNext(
            SecureChannelContext       secureChannelContext,
            RequestHeader              requestHeader,
            bool                       releaseContinuationPoint,
            byte[]                     continuationPoint,
            out QueryDataSetCollection queryDataSets,
            out byte[]                 revisedContinuationPoint);

        #if (!OPCUA_EXCLUDE_QueryNext_ASYNC)
        /// <summary>
        /// Invokes the QueryNext service using async Task based request.
        /// </summary>
        Task<QueryNextResponse> QueryNextAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            bool                 releaseContinuationPoint,
            byte[]               continuationPoint,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Read)
        /// <summary>
        /// Invokes the Read service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Read_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use ReadAsync instead.")]
        #endif
        ResponseHeader Read(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            double                       maxAge,
            TimestampsToReturn           timestampsToReturn,
            ReadValueIdCollection        nodesToRead,
            out DataValueCollection      results,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_Read_ASYNC)
        /// <summary>
        /// Invokes the Read service using async Task based request.
        /// </summary>
        Task<ReadResponse> ReadAsync(
            SecureChannelContext  secureChannelContext,
            RequestHeader         requestHeader,
            double                maxAge,
            TimestampsToReturn    timestampsToReturn,
            ReadValueIdCollection nodesToRead,
            CancellationToken     ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_HistoryRead)
        /// <summary>
        /// Invokes the HistoryRead service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_HistoryRead_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use HistoryReadAsync instead.")]
        #endif
        ResponseHeader HistoryRead(
            SecureChannelContext            secureChannelContext,
            RequestHeader                   requestHeader,
            ExtensionObject                 historyReadDetails,
            TimestampsToReturn              timestampsToReturn,
            bool                            releaseContinuationPoints,
            HistoryReadValueIdCollection    nodesToRead,
            out HistoryReadResultCollection results,
            out DiagnosticInfoCollection    diagnosticInfos);

        #if (!OPCUA_EXCLUDE_HistoryRead_ASYNC)
        /// <summary>
        /// Invokes the HistoryRead service using async Task based request.
        /// </summary>
        Task<HistoryReadResponse> HistoryReadAsync(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            ExtensionObject              historyReadDetails,
            TimestampsToReturn           timestampsToReturn,
            bool                         releaseContinuationPoints,
            HistoryReadValueIdCollection nodesToRead,
            CancellationToken            ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Write)
        /// <summary>
        /// Invokes the Write service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Write_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use WriteAsync instead.")]
        #endif
        ResponseHeader Write(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            WriteValueCollection         nodesToWrite,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_Write_ASYNC)
        /// <summary>
        /// Invokes the Write service using async Task based request.
        /// </summary>
        Task<WriteResponse> WriteAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            WriteValueCollection nodesToWrite,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_HistoryUpdate)
        /// <summary>
        /// Invokes the HistoryUpdate service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_HistoryUpdate_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use HistoryUpdateAsync instead.")]
        #endif
        ResponseHeader HistoryUpdate(
            SecureChannelContext              secureChannelContext,
            RequestHeader                     requestHeader,
            ExtensionObjectCollection         historyUpdateDetails,
            out HistoryUpdateResultCollection results,
            out DiagnosticInfoCollection      diagnosticInfos);

        #if (!OPCUA_EXCLUDE_HistoryUpdate_ASYNC)
        /// <summary>
        /// Invokes the HistoryUpdate service using async Task based request.
        /// </summary>
        Task<HistoryUpdateResponse> HistoryUpdateAsync(
            SecureChannelContext      secureChannelContext,
            RequestHeader             requestHeader,
            ExtensionObjectCollection historyUpdateDetails,
            CancellationToken         ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Call)
        /// <summary>
        /// Invokes the Call service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Call_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use CallAsync instead.")]
        #endif
        ResponseHeader Call(
            SecureChannelContext           secureChannelContext,
            RequestHeader                  requestHeader,
            CallMethodRequestCollection    methodsToCall,
            out CallMethodResultCollection results,
            out DiagnosticInfoCollection   diagnosticInfos);

        #if (!OPCUA_EXCLUDE_Call_ASYNC)
        /// <summary>
        /// Invokes the Call service using async Task based request.
        /// </summary>
        Task<CallResponse> CallAsync(
            SecureChannelContext        secureChannelContext,
            RequestHeader               requestHeader,
            CallMethodRequestCollection methodsToCall,
            CancellationToken           ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_CreateMonitoredItems)
        /// <summary>
        /// Invokes the CreateMonitoredItems service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_CreateMonitoredItems_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use CreateMonitoredItemsAsync instead.")]
        #endif
        ResponseHeader CreateMonitoredItems(
            SecureChannelContext                    secureChannelContext,
            RequestHeader                           requestHeader,
            uint                                    subscriptionId,
            TimestampsToReturn                      timestampsToReturn,
            MonitoredItemCreateRequestCollection    itemsToCreate,
            out MonitoredItemCreateResultCollection results,
            out DiagnosticInfoCollection            diagnosticInfos);

        #if (!OPCUA_EXCLUDE_CreateMonitoredItems_ASYNC)
        /// <summary>
        /// Invokes the CreateMonitoredItems service using async Task based request.
        /// </summary>
        Task<CreateMonitoredItemsResponse> CreateMonitoredItemsAsync(
            SecureChannelContext                 secureChannelContext,
            RequestHeader                        requestHeader,
            uint                                 subscriptionId,
            TimestampsToReturn                   timestampsToReturn,
            MonitoredItemCreateRequestCollection itemsToCreate,
            CancellationToken                    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_ModifyMonitoredItems)
        /// <summary>
        /// Invokes the ModifyMonitoredItems service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_ModifyMonitoredItems_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use ModifyMonitoredItemsAsync instead.")]
        #endif
        ResponseHeader ModifyMonitoredItems(
            SecureChannelContext                    secureChannelContext,
            RequestHeader                           requestHeader,
            uint                                    subscriptionId,
            TimestampsToReturn                      timestampsToReturn,
            MonitoredItemModifyRequestCollection    itemsToModify,
            out MonitoredItemModifyResultCollection results,
            out DiagnosticInfoCollection            diagnosticInfos);

        #if (!OPCUA_EXCLUDE_ModifyMonitoredItems_ASYNC)
        /// <summary>
        /// Invokes the ModifyMonitoredItems service using async Task based request.
        /// </summary>
        Task<ModifyMonitoredItemsResponse> ModifyMonitoredItemsAsync(
            SecureChannelContext                 secureChannelContext,
            RequestHeader                        requestHeader,
            uint                                 subscriptionId,
            TimestampsToReturn                   timestampsToReturn,
            MonitoredItemModifyRequestCollection itemsToModify,
            CancellationToken                    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_SetMonitoringMode)
        /// <summary>
        /// Invokes the SetMonitoringMode service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_SetMonitoringMode_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use SetMonitoringModeAsync instead.")]
        #endif
        ResponseHeader SetMonitoringMode(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            uint                         subscriptionId,
            MonitoringMode               monitoringMode,
            UInt32Collection             monitoredItemIds,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_SetMonitoringMode_ASYNC)
        /// <summary>
        /// Invokes the SetMonitoringMode service using async Task based request.
        /// </summary>
        Task<SetMonitoringModeResponse> SetMonitoringModeAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 subscriptionId,
            MonitoringMode       monitoringMode,
            UInt32Collection     monitoredItemIds,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_SetTriggering)
        /// <summary>
        /// Invokes the SetTriggering service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_SetTriggering_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use SetTriggeringAsync instead.")]
        #endif
        ResponseHeader SetTriggering(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            uint                         subscriptionId,
            uint                         triggeringItemId,
            UInt32Collection             linksToAdd,
            UInt32Collection             linksToRemove,
            out StatusCodeCollection     addResults,
            out DiagnosticInfoCollection addDiagnosticInfos,
            out StatusCodeCollection     removeResults,
            out DiagnosticInfoCollection removeDiagnosticInfos);

        #if (!OPCUA_EXCLUDE_SetTriggering_ASYNC)
        /// <summary>
        /// Invokes the SetTriggering service using async Task based request.
        /// </summary>
        Task<SetTriggeringResponse> SetTriggeringAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 subscriptionId,
            uint                 triggeringItemId,
            UInt32Collection     linksToAdd,
            UInt32Collection     linksToRemove,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_DeleteMonitoredItems)
        /// <summary>
        /// Invokes the DeleteMonitoredItems service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_DeleteMonitoredItems_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use DeleteMonitoredItemsAsync instead.")]
        #endif
        ResponseHeader DeleteMonitoredItems(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            uint                         subscriptionId,
            UInt32Collection             monitoredItemIds,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_DeleteMonitoredItems_ASYNC)
        /// <summary>
        /// Invokes the DeleteMonitoredItems service using async Task based request.
        /// </summary>
        Task<DeleteMonitoredItemsResponse> DeleteMonitoredItemsAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 subscriptionId,
            UInt32Collection     monitoredItemIds,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_CreateSubscription)
        /// <summary>
        /// Invokes the CreateSubscription service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_CreateSubscription_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use CreateSubscriptionAsync instead.")]
        #endif
        ResponseHeader CreateSubscription(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            double               requestedPublishingInterval,
            uint                 requestedLifetimeCount,
            uint                 requestedMaxKeepAliveCount,
            uint                 maxNotificationsPerPublish,
            bool                 publishingEnabled,
            byte                 priority,
            out uint             subscriptionId,
            out double           revisedPublishingInterval,
            out uint             revisedLifetimeCount,
            out uint             revisedMaxKeepAliveCount);

        #if (!OPCUA_EXCLUDE_CreateSubscription_ASYNC)
        /// <summary>
        /// Invokes the CreateSubscription service using async Task based request.
        /// </summary>
        Task<CreateSubscriptionResponse> CreateSubscriptionAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            double               requestedPublishingInterval,
            uint                 requestedLifetimeCount,
            uint                 requestedMaxKeepAliveCount,
            uint                 maxNotificationsPerPublish,
            bool                 publishingEnabled,
            byte                 priority,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_ModifySubscription)
        /// <summary>
        /// Invokes the ModifySubscription service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_ModifySubscription_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use ModifySubscriptionAsync instead.")]
        #endif
        ResponseHeader ModifySubscription(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 subscriptionId,
            double               requestedPublishingInterval,
            uint                 requestedLifetimeCount,
            uint                 requestedMaxKeepAliveCount,
            uint                 maxNotificationsPerPublish,
            byte                 priority,
            out double           revisedPublishingInterval,
            out uint             revisedLifetimeCount,
            out uint             revisedMaxKeepAliveCount);

        #if (!OPCUA_EXCLUDE_ModifySubscription_ASYNC)
        /// <summary>
        /// Invokes the ModifySubscription service using async Task based request.
        /// </summary>
        Task<ModifySubscriptionResponse> ModifySubscriptionAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 subscriptionId,
            double               requestedPublishingInterval,
            uint                 requestedLifetimeCount,
            uint                 requestedMaxKeepAliveCount,
            uint                 maxNotificationsPerPublish,
            byte                 priority,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_SetPublishingMode)
        /// <summary>
        /// Invokes the SetPublishingMode service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_SetPublishingMode_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use SetPublishingModeAsync instead.")]
        #endif
        ResponseHeader SetPublishingMode(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            bool                         publishingEnabled,
            UInt32Collection             subscriptionIds,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_SetPublishingMode_ASYNC)
        /// <summary>
        /// Invokes the SetPublishingMode service using async Task based request.
        /// </summary>
        Task<SetPublishingModeResponse> SetPublishingModeAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            bool                 publishingEnabled,
            UInt32Collection     subscriptionIds,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Publish)
        /// <summary>
        /// Invokes the Publish service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Publish_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use PublishAsync instead.")]
        #endif
        ResponseHeader Publish(
            SecureChannelContext                  secureChannelContext,
            RequestHeader                         requestHeader,
            SubscriptionAcknowledgementCollection subscriptionAcknowledgements,
            out uint                              subscriptionId,
            out UInt32Collection                  availableSequenceNumbers,
            out bool                              moreNotifications,
            out NotificationMessage               notificationMessage,
            out StatusCodeCollection              results,
            out DiagnosticInfoCollection          diagnosticInfos);

        #if (!OPCUA_EXCLUDE_Publish_ASYNC)
        /// <summary>
        /// Invokes the Publish service using async Task based request.
        /// </summary>
        Task<PublishResponse> PublishAsync(
            SecureChannelContext                  secureChannelContext,
            RequestHeader                         requestHeader,
            SubscriptionAcknowledgementCollection subscriptionAcknowledgements,
            CancellationToken                     ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Republish)
        /// <summary>
        /// Invokes the Republish service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Republish_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use RepublishAsync instead.")]
        #endif
        ResponseHeader Republish(
            SecureChannelContext    secureChannelContext,
            RequestHeader           requestHeader,
            uint                    subscriptionId,
            uint                    retransmitSequenceNumber,
            out NotificationMessage notificationMessage);

        #if (!OPCUA_EXCLUDE_Republish_ASYNC)
        /// <summary>
        /// Invokes the Republish service using async Task based request.
        /// </summary>
        Task<RepublishResponse> RepublishAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 subscriptionId,
            uint                 retransmitSequenceNumber,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_TransferSubscriptions)
        /// <summary>
        /// Invokes the TransferSubscriptions service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_TransferSubscriptions_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use TransferSubscriptionsAsync instead.")]
        #endif
        ResponseHeader TransferSubscriptions(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            UInt32Collection             subscriptionIds,
            bool                         sendInitialValues,
            out TransferResultCollection results,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_TransferSubscriptions_ASYNC)
        /// <summary>
        /// Invokes the TransferSubscriptions service using async Task based request.
        /// </summary>
        Task<TransferSubscriptionsResponse> TransferSubscriptionsAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            UInt32Collection     subscriptionIds,
            bool                 sendInitialValues,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_DeleteSubscriptions)
        /// <summary>
        /// Invokes the DeleteSubscriptions service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_DeleteSubscriptions_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use DeleteSubscriptionsAsync instead.")]
        #endif
        ResponseHeader DeleteSubscriptions(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            UInt32Collection             subscriptionIds,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_DeleteSubscriptions_ASYNC)
        /// <summary>
        /// Invokes the DeleteSubscriptions service using async Task based request.
        /// </summary>
        Task<DeleteSubscriptionsResponse> DeleteSubscriptionsAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            UInt32Collection     subscriptionIds,
            CancellationToken    ct);
        #endif
        #endif
    }
    #endregion

    #region SessionServerBase Class
    /// <summary>
    /// A basic implementation of the UA server.
    /// </summary>
    /// <exclude />
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Opc.Ua.ModelCompiler", "1.0.0.0")]
    [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute()]
    public partial class SessionServerBase : ServerBase, ISessionServer
    {
        #if (!OPCUA_EXCLUDE_FindServers)
        /// <summary>
        /// Invokes the FindServers service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_FindServers_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use FindServersAsync instead.")]
        #endif
        public virtual ResponseHeader FindServers(
            SecureChannelContext                 secureChannelContext,
            RequestHeader                        requestHeader,
            string                               endpointUrl,
            StringCollection                     localeIds,
            StringCollection                     serverUris,
            out ApplicationDescriptionCollection servers)
        {
            servers = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_FindServers_ASYNC)
        /// <summary>
        /// Invokes the FindServers service using async Task based request.
        /// </summary>
        public virtual async Task<FindServersResponse> FindServersAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            string               endpointUrl,
            StringCollection     localeIds,
            StringCollection     serverUris,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_FindServersOnNetwork)
        /// <summary>
        /// Invokes the FindServersOnNetwork service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_FindServersOnNetwork_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use FindServersOnNetworkAsync instead.")]
        #endif
        public virtual ResponseHeader FindServersOnNetwork(
            SecureChannelContext          secureChannelContext,
            RequestHeader                 requestHeader,
            uint                          startingRecordId,
            uint                          maxRecordsToReturn,
            StringCollection              serverCapabilityFilter,
            out DateTime                  lastCounterResetTime,
            out ServerOnNetworkCollection servers)
        {
            lastCounterResetTime = DateTime.MinValue;
            servers = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_FindServersOnNetwork_ASYNC)
        /// <summary>
        /// Invokes the FindServersOnNetwork service using async Task based request.
        /// </summary>
        public virtual async Task<FindServersOnNetworkResponse> FindServersOnNetworkAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 startingRecordId,
            uint                 maxRecordsToReturn,
            StringCollection     serverCapabilityFilter,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_GetEndpoints)
        /// <summary>
        /// Invokes the GetEndpoints service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_GetEndpoints_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use GetEndpointsAsync instead.")]
        #endif
        public virtual ResponseHeader GetEndpoints(
            SecureChannelContext              secureChannelContext,
            RequestHeader                     requestHeader,
            string                            endpointUrl,
            StringCollection                  localeIds,
            StringCollection                  profileUris,
            out EndpointDescriptionCollection endpoints)
        {
            endpoints = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_GetEndpoints_ASYNC)
        /// <summary>
        /// Invokes the GetEndpoints service using async Task based request.
        /// </summary>
        public virtual async Task<GetEndpointsResponse> GetEndpointsAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            string               endpointUrl,
            StringCollection     localeIds,
            StringCollection     profileUris,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_CreateSession)
        /// <summary>
        /// Invokes the CreateSession service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_CreateSession_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use CreateSessionAsync instead.")]
        #endif
        public virtual ResponseHeader CreateSession(
            SecureChannelContext                    secureChannelContext,
            RequestHeader                           requestHeader,
            ApplicationDescription                  clientDescription,
            string                                  serverUri,
            string                                  endpointUrl,
            string                                  sessionName,
            byte[]                                  clientNonce,
            byte[]                                  clientCertificate,
            double                                  requestedSessionTimeout,
            uint                                    maxResponseMessageSize,
            out NodeId                              sessionId,
            out NodeId                              authenticationToken,
            out double                              revisedSessionTimeout,
            out byte[]                              serverNonce,
            out byte[]                              serverCertificate,
            out EndpointDescriptionCollection       serverEndpoints,
            out SignedSoftwareCertificateCollection serverSoftwareCertificates,
            out SignatureData                       serverSignature,
            out uint                                maxRequestMessageSize)
        {
            sessionId = null;
            authenticationToken = null;
            revisedSessionTimeout = 0;
            serverNonce = null;
            serverCertificate = null;
            serverEndpoints = null;
            serverSoftwareCertificates = null;
            serverSignature = null;
            maxRequestMessageSize = 0;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_CreateSession_ASYNC)
        /// <summary>
        /// Invokes the CreateSession service using async Task based request.
        /// </summary>
        public virtual async Task<CreateSessionResponse> CreateSessionAsync(
            SecureChannelContext   secureChannelContext,
            RequestHeader          requestHeader,
            ApplicationDescription clientDescription,
            string                 serverUri,
            string                 endpointUrl,
            string                 sessionName,
            byte[]                 clientNonce,
            byte[]                 clientCertificate,
            double                 requestedSessionTimeout,
            uint                   maxResponseMessageSize,
            CancellationToken      ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_ActivateSession)
        /// <summary>
        /// Invokes the ActivateSession service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_ActivateSession_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use ActivateSessionAsync instead.")]
        #endif
        public virtual ResponseHeader ActivateSession(
            SecureChannelContext                secureChannelContext,
            RequestHeader                       requestHeader,
            SignatureData                       clientSignature,
            SignedSoftwareCertificateCollection clientSoftwareCertificates,
            StringCollection                    localeIds,
            ExtensionObject                     userIdentityToken,
            SignatureData                       userTokenSignature,
            out byte[]                          serverNonce,
            out StatusCodeCollection            results,
            out DiagnosticInfoCollection        diagnosticInfos)
        {
            serverNonce = null;
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_ActivateSession_ASYNC)
        /// <summary>
        /// Invokes the ActivateSession service using async Task based request.
        /// </summary>
        public virtual async Task<ActivateSessionResponse> ActivateSessionAsync(
            SecureChannelContext                secureChannelContext,
            RequestHeader                       requestHeader,
            SignatureData                       clientSignature,
            SignedSoftwareCertificateCollection clientSoftwareCertificates,
            StringCollection                    localeIds,
            ExtensionObject                     userIdentityToken,
            SignatureData                       userTokenSignature,
            CancellationToken                   ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_CloseSession)
        /// <summary>
        /// Invokes the CloseSession service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_CloseSession_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use CloseSessionAsync instead.")]
        #endif
        public virtual ResponseHeader CloseSession(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            bool                 deleteSubscriptions)
        {

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_CloseSession_ASYNC)
        /// <summary>
        /// Invokes the CloseSession service using async Task based request.
        /// </summary>
        public virtual async Task<CloseSessionResponse> CloseSessionAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            bool                 deleteSubscriptions,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Cancel)
        /// <summary>
        /// Invokes the Cancel service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Cancel_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use CancelAsync instead.")]
        #endif
        public virtual ResponseHeader Cancel(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 requestHandle,
            out uint             cancelCount)
        {
            cancelCount = 0;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_Cancel_ASYNC)
        /// <summary>
        /// Invokes the Cancel service using async Task based request.
        /// </summary>
        public virtual async Task<CancelResponse> CancelAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 requestHandle,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_AddNodes)
        /// <summary>
        /// Invokes the AddNodes service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_AddNodes_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use AddNodesAsync instead.")]
        #endif
        public virtual ResponseHeader AddNodes(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            AddNodesItemCollection       nodesToAdd,
            out AddNodesResultCollection results,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_AddNodes_ASYNC)
        /// <summary>
        /// Invokes the AddNodes service using async Task based request.
        /// </summary>
        public virtual async Task<AddNodesResponse> AddNodesAsync(
            SecureChannelContext   secureChannelContext,
            RequestHeader          requestHeader,
            AddNodesItemCollection nodesToAdd,
            CancellationToken      ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_AddReferences)
        /// <summary>
        /// Invokes the AddReferences service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_AddReferences_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use AddReferencesAsync instead.")]
        #endif
        public virtual ResponseHeader AddReferences(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            AddReferencesItemCollection  referencesToAdd,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_AddReferences_ASYNC)
        /// <summary>
        /// Invokes the AddReferences service using async Task based request.
        /// </summary>
        public virtual async Task<AddReferencesResponse> AddReferencesAsync(
            SecureChannelContext        secureChannelContext,
            RequestHeader               requestHeader,
            AddReferencesItemCollection referencesToAdd,
            CancellationToken           ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_DeleteNodes)
        /// <summary>
        /// Invokes the DeleteNodes service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_DeleteNodes_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use DeleteNodesAsync instead.")]
        #endif
        public virtual ResponseHeader DeleteNodes(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            DeleteNodesItemCollection    nodesToDelete,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_DeleteNodes_ASYNC)
        /// <summary>
        /// Invokes the DeleteNodes service using async Task based request.
        /// </summary>
        public virtual async Task<DeleteNodesResponse> DeleteNodesAsync(
            SecureChannelContext      secureChannelContext,
            RequestHeader             requestHeader,
            DeleteNodesItemCollection nodesToDelete,
            CancellationToken         ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_DeleteReferences)
        /// <summary>
        /// Invokes the DeleteReferences service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_DeleteReferences_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use DeleteReferencesAsync instead.")]
        #endif
        public virtual ResponseHeader DeleteReferences(
            SecureChannelContext           secureChannelContext,
            RequestHeader                  requestHeader,
            DeleteReferencesItemCollection referencesToDelete,
            out StatusCodeCollection       results,
            out DiagnosticInfoCollection   diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_DeleteReferences_ASYNC)
        /// <summary>
        /// Invokes the DeleteReferences service using async Task based request.
        /// </summary>
        public virtual async Task<DeleteReferencesResponse> DeleteReferencesAsync(
            SecureChannelContext           secureChannelContext,
            RequestHeader                  requestHeader,
            DeleteReferencesItemCollection referencesToDelete,
            CancellationToken              ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Browse)
        /// <summary>
        /// Invokes the Browse service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Browse_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use BrowseAsync instead.")]
        #endif
        public virtual ResponseHeader Browse(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            ViewDescription              view,
            uint                         requestedMaxReferencesPerNode,
            BrowseDescriptionCollection  nodesToBrowse,
            out BrowseResultCollection   results,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_Browse_ASYNC)
        /// <summary>
        /// Invokes the Browse service using async Task based request.
        /// </summary>
        public virtual async Task<BrowseResponse> BrowseAsync(
            SecureChannelContext        secureChannelContext,
            RequestHeader               requestHeader,
            ViewDescription             view,
            uint                        requestedMaxReferencesPerNode,
            BrowseDescriptionCollection nodesToBrowse,
            CancellationToken           ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_BrowseNext)
        /// <summary>
        /// Invokes the BrowseNext service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_BrowseNext_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use BrowseNextAsync instead.")]
        #endif
        public virtual ResponseHeader BrowseNext(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            bool                         releaseContinuationPoints,
            ByteStringCollection         continuationPoints,
            out BrowseResultCollection   results,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_BrowseNext_ASYNC)
        /// <summary>
        /// Invokes the BrowseNext service using async Task based request.
        /// </summary>
        public virtual async Task<BrowseNextResponse> BrowseNextAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            bool                 releaseContinuationPoints,
            ByteStringCollection continuationPoints,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_TranslateBrowsePathsToNodeIds)
        /// <summary>
        /// Invokes the TranslateBrowsePathsToNodeIds service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_TranslateBrowsePathsToNodeIds_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use TranslateBrowsePathsToNodeIdsAsync instead.")]
        #endif
        public virtual ResponseHeader TranslateBrowsePathsToNodeIds(
            SecureChannelContext           secureChannelContext,
            RequestHeader                  requestHeader,
            BrowsePathCollection           browsePaths,
            out BrowsePathResultCollection results,
            out DiagnosticInfoCollection   diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_TranslateBrowsePathsToNodeIds_ASYNC)
        /// <summary>
        /// Invokes the TranslateBrowsePathsToNodeIds service using async Task based request.
        /// </summary>
        public virtual async Task<TranslateBrowsePathsToNodeIdsResponse> TranslateBrowsePathsToNodeIdsAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            BrowsePathCollection browsePaths,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_RegisterNodes)
        /// <summary>
        /// Invokes the RegisterNodes service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_RegisterNodes_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use RegisterNodesAsync instead.")]
        #endif
        public virtual ResponseHeader RegisterNodes(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            NodeIdCollection     nodesToRegister,
            out NodeIdCollection registeredNodeIds)
        {
            registeredNodeIds = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_RegisterNodes_ASYNC)
        /// <summary>
        /// Invokes the RegisterNodes service using async Task based request.
        /// </summary>
        public virtual async Task<RegisterNodesResponse> RegisterNodesAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            NodeIdCollection     nodesToRegister,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_UnregisterNodes)
        /// <summary>
        /// Invokes the UnregisterNodes service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_UnregisterNodes_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use UnregisterNodesAsync instead.")]
        #endif
        public virtual ResponseHeader UnregisterNodes(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            NodeIdCollection     nodesToUnregister)
        {

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_UnregisterNodes_ASYNC)
        /// <summary>
        /// Invokes the UnregisterNodes service using async Task based request.
        /// </summary>
        public virtual async Task<UnregisterNodesResponse> UnregisterNodesAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            NodeIdCollection     nodesToUnregister,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_QueryFirst)
        /// <summary>
        /// Invokes the QueryFirst service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_QueryFirst_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use QueryFirstAsync instead.")]
        #endif
        public virtual ResponseHeader QueryFirst(
            SecureChannelContext          secureChannelContext,
            RequestHeader                 requestHeader,
            ViewDescription               view,
            NodeTypeDescriptionCollection nodeTypes,
            ContentFilter                 filter,
            uint                          maxDataSetsToReturn,
            uint                          maxReferencesToReturn,
            out QueryDataSetCollection    queryDataSets,
            out byte[]                    continuationPoint,
            out ParsingResultCollection   parsingResults,
            out DiagnosticInfoCollection  diagnosticInfos,
            out ContentFilterResult       filterResult)
        {
            queryDataSets = null;
            continuationPoint = null;
            parsingResults = null;
            diagnosticInfos = null;
            filterResult = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_QueryFirst_ASYNC)
        /// <summary>
        /// Invokes the QueryFirst service using async Task based request.
        /// </summary>
        public virtual async Task<QueryFirstResponse> QueryFirstAsync(
            SecureChannelContext          secureChannelContext,
            RequestHeader                 requestHeader,
            ViewDescription               view,
            NodeTypeDescriptionCollection nodeTypes,
            ContentFilter                 filter,
            uint                          maxDataSetsToReturn,
            uint                          maxReferencesToReturn,
            CancellationToken             ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_QueryNext)
        /// <summary>
        /// Invokes the QueryNext service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_QueryNext_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use QueryNextAsync instead.")]
        #endif
        public virtual ResponseHeader QueryNext(
            SecureChannelContext       secureChannelContext,
            RequestHeader              requestHeader,
            bool                       releaseContinuationPoint,
            byte[]                     continuationPoint,
            out QueryDataSetCollection queryDataSets,
            out byte[]                 revisedContinuationPoint)
        {
            queryDataSets = null;
            revisedContinuationPoint = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_QueryNext_ASYNC)
        /// <summary>
        /// Invokes the QueryNext service using async Task based request.
        /// </summary>
        public virtual async Task<QueryNextResponse> QueryNextAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            bool                 releaseContinuationPoint,
            byte[]               continuationPoint,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Read)
        /// <summary>
        /// Invokes the Read service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Read_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use ReadAsync instead.")]
        #endif
        public virtual ResponseHeader Read(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            double                       maxAge,
            TimestampsToReturn           timestampsToReturn,
            ReadValueIdCollection        nodesToRead,
            out DataValueCollection      results,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_Read_ASYNC)
        /// <summary>
        /// Invokes the Read service using async Task based request.
        /// </summary>
        public virtual async Task<ReadResponse> ReadAsync(
            SecureChannelContext  secureChannelContext,
            RequestHeader         requestHeader,
            double                maxAge,
            TimestampsToReturn    timestampsToReturn,
            ReadValueIdCollection nodesToRead,
            CancellationToken     ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_HistoryRead)
        /// <summary>
        /// Invokes the HistoryRead service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_HistoryRead_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use HistoryReadAsync instead.")]
        #endif
        public virtual ResponseHeader HistoryRead(
            SecureChannelContext            secureChannelContext,
            RequestHeader                   requestHeader,
            ExtensionObject                 historyReadDetails,
            TimestampsToReturn              timestampsToReturn,
            bool                            releaseContinuationPoints,
            HistoryReadValueIdCollection    nodesToRead,
            out HistoryReadResultCollection results,
            out DiagnosticInfoCollection    diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_HistoryRead_ASYNC)
        /// <summary>
        /// Invokes the HistoryRead service using async Task based request.
        /// </summary>
        public virtual async Task<HistoryReadResponse> HistoryReadAsync(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            ExtensionObject              historyReadDetails,
            TimestampsToReturn           timestampsToReturn,
            bool                         releaseContinuationPoints,
            HistoryReadValueIdCollection nodesToRead,
            CancellationToken            ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Write)
        /// <summary>
        /// Invokes the Write service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Write_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use WriteAsync instead.")]
        #endif
        public virtual ResponseHeader Write(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            WriteValueCollection         nodesToWrite,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_Write_ASYNC)
        /// <summary>
        /// Invokes the Write service using async Task based request.
        /// </summary>
        public virtual async Task<WriteResponse> WriteAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            WriteValueCollection nodesToWrite,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_HistoryUpdate)
        /// <summary>
        /// Invokes the HistoryUpdate service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_HistoryUpdate_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use HistoryUpdateAsync instead.")]
        #endif
        public virtual ResponseHeader HistoryUpdate(
            SecureChannelContext              secureChannelContext,
            RequestHeader                     requestHeader,
            ExtensionObjectCollection         historyUpdateDetails,
            out HistoryUpdateResultCollection results,
            out DiagnosticInfoCollection      diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_HistoryUpdate_ASYNC)
        /// <summary>
        /// Invokes the HistoryUpdate service using async Task based request.
        /// </summary>
        public virtual async Task<HistoryUpdateResponse> HistoryUpdateAsync(
            SecureChannelContext      secureChannelContext,
            RequestHeader             requestHeader,
            ExtensionObjectCollection historyUpdateDetails,
            CancellationToken         ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Call)
        /// <summary>
        /// Invokes the Call service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Call_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use CallAsync instead.")]
        #endif
        public virtual ResponseHeader Call(
            SecureChannelContext           secureChannelContext,
            RequestHeader                  requestHeader,
            CallMethodRequestCollection    methodsToCall,
            out CallMethodResultCollection results,
            out DiagnosticInfoCollection   diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_Call_ASYNC)
        /// <summary>
        /// Invokes the Call service using async Task based request.
        /// </summary>
        public virtual async Task<CallResponse> CallAsync(
            SecureChannelContext        secureChannelContext,
            RequestHeader               requestHeader,
            CallMethodRequestCollection methodsToCall,
            CancellationToken           ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_CreateMonitoredItems)
        /// <summary>
        /// Invokes the CreateMonitoredItems service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_CreateMonitoredItems_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use CreateMonitoredItemsAsync instead.")]
        #endif
        public virtual ResponseHeader CreateMonitoredItems(
            SecureChannelContext                    secureChannelContext,
            RequestHeader                           requestHeader,
            uint                                    subscriptionId,
            TimestampsToReturn                      timestampsToReturn,
            MonitoredItemCreateRequestCollection    itemsToCreate,
            out MonitoredItemCreateResultCollection results,
            out DiagnosticInfoCollection            diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_CreateMonitoredItems_ASYNC)
        /// <summary>
        /// Invokes the CreateMonitoredItems service using async Task based request.
        /// </summary>
        public virtual async Task<CreateMonitoredItemsResponse> CreateMonitoredItemsAsync(
            SecureChannelContext                 secureChannelContext,
            RequestHeader                        requestHeader,
            uint                                 subscriptionId,
            TimestampsToReturn                   timestampsToReturn,
            MonitoredItemCreateRequestCollection itemsToCreate,
            CancellationToken                    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_ModifyMonitoredItems)
        /// <summary>
        /// Invokes the ModifyMonitoredItems service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_ModifyMonitoredItems_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use ModifyMonitoredItemsAsync instead.")]
        #endif
        public virtual ResponseHeader ModifyMonitoredItems(
            SecureChannelContext                    secureChannelContext,
            RequestHeader                           requestHeader,
            uint                                    subscriptionId,
            TimestampsToReturn                      timestampsToReturn,
            MonitoredItemModifyRequestCollection    itemsToModify,
            out MonitoredItemModifyResultCollection results,
            out DiagnosticInfoCollection            diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_ModifyMonitoredItems_ASYNC)
        /// <summary>
        /// Invokes the ModifyMonitoredItems service using async Task based request.
        /// </summary>
        public virtual async Task<ModifyMonitoredItemsResponse> ModifyMonitoredItemsAsync(
            SecureChannelContext                 secureChannelContext,
            RequestHeader                        requestHeader,
            uint                                 subscriptionId,
            TimestampsToReturn                   timestampsToReturn,
            MonitoredItemModifyRequestCollection itemsToModify,
            CancellationToken                    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_SetMonitoringMode)
        /// <summary>
        /// Invokes the SetMonitoringMode service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_SetMonitoringMode_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use SetMonitoringModeAsync instead.")]
        #endif
        public virtual ResponseHeader SetMonitoringMode(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            uint                         subscriptionId,
            MonitoringMode               monitoringMode,
            UInt32Collection             monitoredItemIds,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_SetMonitoringMode_ASYNC)
        /// <summary>
        /// Invokes the SetMonitoringMode service using async Task based request.
        /// </summary>
        public virtual async Task<SetMonitoringModeResponse> SetMonitoringModeAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 subscriptionId,
            MonitoringMode       monitoringMode,
            UInt32Collection     monitoredItemIds,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_SetTriggering)
        /// <summary>
        /// Invokes the SetTriggering service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_SetTriggering_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use SetTriggeringAsync instead.")]
        #endif
        public virtual ResponseHeader SetTriggering(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            uint                         subscriptionId,
            uint                         triggeringItemId,
            UInt32Collection             linksToAdd,
            UInt32Collection             linksToRemove,
            out StatusCodeCollection     addResults,
            out DiagnosticInfoCollection addDiagnosticInfos,
            out StatusCodeCollection     removeResults,
            out DiagnosticInfoCollection removeDiagnosticInfos)
        {
            addResults = null;
            addDiagnosticInfos = null;
            removeResults = null;
            removeDiagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_SetTriggering_ASYNC)
        /// <summary>
        /// Invokes the SetTriggering service using async Task based request.
        /// </summary>
        public virtual async Task<SetTriggeringResponse> SetTriggeringAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 subscriptionId,
            uint                 triggeringItemId,
            UInt32Collection     linksToAdd,
            UInt32Collection     linksToRemove,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_DeleteMonitoredItems)
        /// <summary>
        /// Invokes the DeleteMonitoredItems service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_DeleteMonitoredItems_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use DeleteMonitoredItemsAsync instead.")]
        #endif
        public virtual ResponseHeader DeleteMonitoredItems(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            uint                         subscriptionId,
            UInt32Collection             monitoredItemIds,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_DeleteMonitoredItems_ASYNC)
        /// <summary>
        /// Invokes the DeleteMonitoredItems service using async Task based request.
        /// </summary>
        public virtual async Task<DeleteMonitoredItemsResponse> DeleteMonitoredItemsAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 subscriptionId,
            UInt32Collection     monitoredItemIds,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_CreateSubscription)
        /// <summary>
        /// Invokes the CreateSubscription service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_CreateSubscription_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use CreateSubscriptionAsync instead.")]
        #endif
        public virtual ResponseHeader CreateSubscription(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            double               requestedPublishingInterval,
            uint                 requestedLifetimeCount,
            uint                 requestedMaxKeepAliveCount,
            uint                 maxNotificationsPerPublish,
            bool                 publishingEnabled,
            byte                 priority,
            out uint             subscriptionId,
            out double           revisedPublishingInterval,
            out uint             revisedLifetimeCount,
            out uint             revisedMaxKeepAliveCount)
        {
            subscriptionId = 0;
            revisedPublishingInterval = 0;
            revisedLifetimeCount = 0;
            revisedMaxKeepAliveCount = 0;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_CreateSubscription_ASYNC)
        /// <summary>
        /// Invokes the CreateSubscription service using async Task based request.
        /// </summary>
        public virtual async Task<CreateSubscriptionResponse> CreateSubscriptionAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            double               requestedPublishingInterval,
            uint                 requestedLifetimeCount,
            uint                 requestedMaxKeepAliveCount,
            uint                 maxNotificationsPerPublish,
            bool                 publishingEnabled,
            byte                 priority,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_ModifySubscription)
        /// <summary>
        /// Invokes the ModifySubscription service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_ModifySubscription_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use ModifySubscriptionAsync instead.")]
        #endif
        public virtual ResponseHeader ModifySubscription(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 subscriptionId,
            double               requestedPublishingInterval,
            uint                 requestedLifetimeCount,
            uint                 requestedMaxKeepAliveCount,
            uint                 maxNotificationsPerPublish,
            byte                 priority,
            out double           revisedPublishingInterval,
            out uint             revisedLifetimeCount,
            out uint             revisedMaxKeepAliveCount)
        {
            revisedPublishingInterval = 0;
            revisedLifetimeCount = 0;
            revisedMaxKeepAliveCount = 0;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_ModifySubscription_ASYNC)
        /// <summary>
        /// Invokes the ModifySubscription service using async Task based request.
        /// </summary>
        public virtual async Task<ModifySubscriptionResponse> ModifySubscriptionAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 subscriptionId,
            double               requestedPublishingInterval,
            uint                 requestedLifetimeCount,
            uint                 requestedMaxKeepAliveCount,
            uint                 maxNotificationsPerPublish,
            byte                 priority,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_SetPublishingMode)
        /// <summary>
        /// Invokes the SetPublishingMode service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_SetPublishingMode_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use SetPublishingModeAsync instead.")]
        #endif
        public virtual ResponseHeader SetPublishingMode(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            bool                         publishingEnabled,
            UInt32Collection             subscriptionIds,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_SetPublishingMode_ASYNC)
        /// <summary>
        /// Invokes the SetPublishingMode service using async Task based request.
        /// </summary>
        public virtual async Task<SetPublishingModeResponse> SetPublishingModeAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            bool                 publishingEnabled,
            UInt32Collection     subscriptionIds,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Publish)
        /// <summary>
        /// Invokes the Publish service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Publish_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use PublishAsync instead.")]
        #endif
        public virtual ResponseHeader Publish(
            SecureChannelContext                  secureChannelContext,
            RequestHeader                         requestHeader,
            SubscriptionAcknowledgementCollection subscriptionAcknowledgements,
            out uint                              subscriptionId,
            out UInt32Collection                  availableSequenceNumbers,
            out bool                              moreNotifications,
            out NotificationMessage               notificationMessage,
            out StatusCodeCollection              results,
            out DiagnosticInfoCollection          diagnosticInfos)
        {
            subscriptionId = 0;
            availableSequenceNumbers = null;
            moreNotifications = false;
            notificationMessage = null;
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_Publish_ASYNC)
        /// <summary>
        /// Invokes the Publish service using async Task based request.
        /// </summary>
        public virtual async Task<PublishResponse> PublishAsync(
            SecureChannelContext                  secureChannelContext,
            RequestHeader                         requestHeader,
            SubscriptionAcknowledgementCollection subscriptionAcknowledgements,
            CancellationToken                     ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_Republish)
        /// <summary>
        /// Invokes the Republish service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_Republish_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use RepublishAsync instead.")]
        #endif
        public virtual ResponseHeader Republish(
            SecureChannelContext    secureChannelContext,
            RequestHeader           requestHeader,
            uint                    subscriptionId,
            uint                    retransmitSequenceNumber,
            out NotificationMessage notificationMessage)
        {
            notificationMessage = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_Republish_ASYNC)
        /// <summary>
        /// Invokes the Republish service using async Task based request.
        /// </summary>
        public virtual async Task<RepublishResponse> RepublishAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 subscriptionId,
            uint                 retransmitSequenceNumber,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_TransferSubscriptions)
        /// <summary>
        /// Invokes the TransferSubscriptions service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_TransferSubscriptions_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use TransferSubscriptionsAsync instead.")]
        #endif
        public virtual ResponseHeader TransferSubscriptions(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            UInt32Collection             subscriptionIds,
            bool                         sendInitialValues,
            out TransferResultCollection results,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_TransferSubscriptions_ASYNC)
        /// <summary>
        /// Invokes the TransferSubscriptions service using async Task based request.
        /// </summary>
        public virtual async Task<TransferSubscriptionsResponse> TransferSubscriptionsAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            UInt32Collection     subscriptionIds,
            bool                 sendInitialValues,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_DeleteSubscriptions)
        /// <summary>
        /// Invokes the DeleteSubscriptions service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_DeleteSubscriptions_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use DeleteSubscriptionsAsync instead.")]
        #endif
        public virtual ResponseHeader DeleteSubscriptions(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            UInt32Collection             subscriptionIds,
            out StatusCodeCollection     results,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            results = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_DeleteSubscriptions_ASYNC)
        /// <summary>
        /// Invokes the DeleteSubscriptions service using async Task based request.
        /// </summary>
        public virtual async Task<DeleteSubscriptionsResponse> DeleteSubscriptionsAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            UInt32Collection     subscriptionIds,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif
    }
    #endregion

    #region IDiscoveryServer Interface
    /// <summary>
    /// An interface to a UA server implementation.
    /// </summary>
    /// <exclude />
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Opc.Ua.ModelCompiler", "1.0.0.0")]
    public interface IDiscoveryServer : IServerBase
    {
        #if (!OPCUA_EXCLUDE_FindServers)
        /// <summary>
        /// Invokes the FindServers service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_FindServers_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use FindServersAsync instead.")]
        #endif
        ResponseHeader FindServers(
            SecureChannelContext                 secureChannelContext,
            RequestHeader                        requestHeader,
            string                               endpointUrl,
            StringCollection                     localeIds,
            StringCollection                     serverUris,
            out ApplicationDescriptionCollection servers);

        #if (!OPCUA_EXCLUDE_FindServers_ASYNC)
        /// <summary>
        /// Invokes the FindServers service using async Task based request.
        /// </summary>
        Task<FindServersResponse> FindServersAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            string               endpointUrl,
            StringCollection     localeIds,
            StringCollection     serverUris,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_FindServersOnNetwork)
        /// <summary>
        /// Invokes the FindServersOnNetwork service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_FindServersOnNetwork_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use FindServersOnNetworkAsync instead.")]
        #endif
        ResponseHeader FindServersOnNetwork(
            SecureChannelContext          secureChannelContext,
            RequestHeader                 requestHeader,
            uint                          startingRecordId,
            uint                          maxRecordsToReturn,
            StringCollection              serverCapabilityFilter,
            out DateTime                  lastCounterResetTime,
            out ServerOnNetworkCollection servers);

        #if (!OPCUA_EXCLUDE_FindServersOnNetwork_ASYNC)
        /// <summary>
        /// Invokes the FindServersOnNetwork service using async Task based request.
        /// </summary>
        Task<FindServersOnNetworkResponse> FindServersOnNetworkAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 startingRecordId,
            uint                 maxRecordsToReturn,
            StringCollection     serverCapabilityFilter,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_GetEndpoints)
        /// <summary>
        /// Invokes the GetEndpoints service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_GetEndpoints_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use GetEndpointsAsync instead.")]
        #endif
        ResponseHeader GetEndpoints(
            SecureChannelContext              secureChannelContext,
            RequestHeader                     requestHeader,
            string                            endpointUrl,
            StringCollection                  localeIds,
            StringCollection                  profileUris,
            out EndpointDescriptionCollection endpoints);

        #if (!OPCUA_EXCLUDE_GetEndpoints_ASYNC)
        /// <summary>
        /// Invokes the GetEndpoints service using async Task based request.
        /// </summary>
        Task<GetEndpointsResponse> GetEndpointsAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            string               endpointUrl,
            StringCollection     localeIds,
            StringCollection     profileUris,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_RegisterServer)
        /// <summary>
        /// Invokes the RegisterServer service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_RegisterServer_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use RegisterServerAsync instead.")]
        #endif
        ResponseHeader RegisterServer(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            RegisteredServer     server);

        #if (!OPCUA_EXCLUDE_RegisterServer_ASYNC)
        /// <summary>
        /// Invokes the RegisterServer service using async Task based request.
        /// </summary>
        Task<RegisterServerResponse> RegisterServerAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            RegisteredServer     server,
            CancellationToken    ct);
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_RegisterServer2)
        /// <summary>
        /// Invokes the RegisterServer2 service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_RegisterServer2_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use RegisterServer2Async instead.")]
        #endif
        ResponseHeader RegisterServer2(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            RegisteredServer             server,
            ExtensionObjectCollection    discoveryConfiguration,
            out StatusCodeCollection     configurationResults,
            out DiagnosticInfoCollection diagnosticInfos);

        #if (!OPCUA_EXCLUDE_RegisterServer2_ASYNC)
        /// <summary>
        /// Invokes the RegisterServer2 service using async Task based request.
        /// </summary>
        Task<RegisterServer2Response> RegisterServer2Async(
            SecureChannelContext      secureChannelContext,
            RequestHeader             requestHeader,
            RegisteredServer          server,
            ExtensionObjectCollection discoveryConfiguration,
            CancellationToken         ct);
        #endif
        #endif
    }
    #endregion

    #region DiscoveryServerBase Class
    /// <summary>
    /// A basic implementation of the UA server.
    /// </summary>
    /// <exclude />
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Opc.Ua.ModelCompiler", "1.0.0.0")]
    [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute()]
    public partial class DiscoveryServerBase : ServerBase, IDiscoveryServer
    {
        #if (!OPCUA_EXCLUDE_FindServers)
        /// <summary>
        /// Invokes the FindServers service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_FindServers_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use FindServersAsync instead.")]
        #endif
        public virtual ResponseHeader FindServers(
            SecureChannelContext                 secureChannelContext,
            RequestHeader                        requestHeader,
            string                               endpointUrl,
            StringCollection                     localeIds,
            StringCollection                     serverUris,
            out ApplicationDescriptionCollection servers)
        {
            servers = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_FindServers_ASYNC)
        /// <summary>
        /// Invokes the FindServers service using async Task based request.
        /// </summary>
        public virtual async Task<FindServersResponse> FindServersAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            string               endpointUrl,
            StringCollection     localeIds,
            StringCollection     serverUris,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_FindServersOnNetwork)
        /// <summary>
        /// Invokes the FindServersOnNetwork service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_FindServersOnNetwork_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use FindServersOnNetworkAsync instead.")]
        #endif
        public virtual ResponseHeader FindServersOnNetwork(
            SecureChannelContext          secureChannelContext,
            RequestHeader                 requestHeader,
            uint                          startingRecordId,
            uint                          maxRecordsToReturn,
            StringCollection              serverCapabilityFilter,
            out DateTime                  lastCounterResetTime,
            out ServerOnNetworkCollection servers)
        {
            lastCounterResetTime = DateTime.MinValue;
            servers = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_FindServersOnNetwork_ASYNC)
        /// <summary>
        /// Invokes the FindServersOnNetwork service using async Task based request.
        /// </summary>
        public virtual async Task<FindServersOnNetworkResponse> FindServersOnNetworkAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            uint                 startingRecordId,
            uint                 maxRecordsToReturn,
            StringCollection     serverCapabilityFilter,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_GetEndpoints)
        /// <summary>
        /// Invokes the GetEndpoints service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_GetEndpoints_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use GetEndpointsAsync instead.")]
        #endif
        public virtual ResponseHeader GetEndpoints(
            SecureChannelContext              secureChannelContext,
            RequestHeader                     requestHeader,
            string                            endpointUrl,
            StringCollection                  localeIds,
            StringCollection                  profileUris,
            out EndpointDescriptionCollection endpoints)
        {
            endpoints = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_GetEndpoints_ASYNC)
        /// <summary>
        /// Invokes the GetEndpoints service using async Task based request.
        /// </summary>
        public virtual async Task<GetEndpointsResponse> GetEndpointsAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            string               endpointUrl,
            StringCollection     localeIds,
            StringCollection     profileUris,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_RegisterServer)
        /// <summary>
        /// Invokes the RegisterServer service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_RegisterServer_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use RegisterServerAsync instead.")]
        #endif
        public virtual ResponseHeader RegisterServer(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            RegisteredServer     server)
        {

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_RegisterServer_ASYNC)
        /// <summary>
        /// Invokes the RegisterServer service using async Task based request.
        /// </summary>
        public virtual async Task<RegisterServerResponse> RegisterServerAsync(
            SecureChannelContext secureChannelContext,
            RequestHeader        requestHeader,
            RegisteredServer     server,
            CancellationToken    ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif

        #if (!OPCUA_EXCLUDE_RegisterServer2)
        /// <summary>
        /// Invokes the RegisterServer2 service.
        /// </summary>
        #if (NET_STANDARD_OBSOLETE_SYNC && !OPCUA_EXCLUDE_RegisterServer2_ASYNC)
        [Obsolete("Sync methods are deprecated in this version. Use RegisterServer2Async instead.")]
        #endif
        public virtual ResponseHeader RegisterServer2(
            SecureChannelContext         secureChannelContext,
            RequestHeader                requestHeader,
            RegisteredServer             server,
            ExtensionObjectCollection    discoveryConfiguration,
            out StatusCodeCollection     configurationResults,
            out DiagnosticInfoCollection diagnosticInfos)
        {
            configurationResults = null;
            diagnosticInfos = null;

            ValidateRequest(requestHeader);

            // Insert implementation.

            return CreateResponse(requestHeader, StatusCodes.BadServiceUnsupported);
        }

        #if (!OPCUA_EXCLUDE_RegisterServer2_ASYNC)
        /// <summary>
        /// Invokes the RegisterServer2 service using async Task based request.
        /// </summary>
        public virtual async Task<RegisterServer2Response> RegisterServer2Async(
            SecureChannelContext      secureChannelContext,
            RequestHeader             requestHeader,
            RegisteredServer          server,
            ExtensionObjectCollection discoveryConfiguration,
            CancellationToken         ct)
        {
            ValidateRequest(requestHeader);

            // Insert implementation.
            await Task.CompletedTask;

            throw new ServiceResultException(StatusCodes.BadServiceUnsupported);
        }
        #endif
        #endif
    }
    #endregion
}
